Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch api values #237

Open
wants to merge 2 commits into
base: legacy
Choose a base branch
from
Open

Fetch api values #237

wants to merge 2 commits into from

Conversation

giosce
Copy link

@giosce giosce commented Feb 10, 2022

I'm working on adopting public code by a large US organization. We will need more changes, this is a basic one.
My ideal approach is to have as much common code as possible and have country or organization customizations as much as possible in config files.

This change allows to populate the "Scope" dropdown from a different source, in this case from our Taxonomy API. It is backward compatible, if someone doesn't provide a fetch URL the app will continue to work like it is now.

Happy to review/discuss this and other change ideas.

@vercel
Copy link

vercel bot commented Feb 10, 2022

@giosce is attempting to deploy a commit to the dip-trasformazione-digitale Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Feb 16, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/dip-trasformazione-digitale/publiccode-editor/31z4i9acjkRWnMwSyhE1zR4AxpGN
✅ Preview: https://publiccode-editor-git-fork-g-fa83f3-dip-trasformazione-digitale.vercel.app

@bfabio
Copy link
Member

bfabio commented Feb 16, 2022

@giosce I'm not convinced by this one, as the editor would generate an invalid publiccode.yml.

One solution could be using a US centric key in a country specific section (and have the editor show the country specific sections based on which countries are enabled in the config file).

Alternatively, we can discuss to change the scopes in the Standard for everyone, over at the [Standard's Discussions],(https://github.com/publiccodeyml/publiccode.yml/discussions) and see if it gets traction.

@giosce
Copy link
Author

giosce commented Feb 21, 2022

Thanks Fabio for your feedback.
I didn't understand how the publiccode.yml is validated (by a software?).
I appreciate that Digital PA has done and is doing a lot of work for publiccode. But it seems really strange to me if a valid publiccode.yml can't have different values. The schema validation should, in my opinion, check that mandatory fields and their format are provided, actual values can be dependent on the context.
I'll take a look at the "Standard", thanks!

@bfabio
Copy link
Member

bfabio commented Feb 23, 2022

@giosce you're welcome!

There is a reference validator at https://github.com/italia/publiccode-parser-go which checks for conformance to the publiccode.yml Standard (https://yml.publiccode.tools/).

As of now the Standard defines not only the keys in the YAML, but also the value they can hold, in some cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants